cmake_minimum_required(VERSION 3.15)

project(MKV2JPG)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED true)
set(CMAKE_CXX_FLAGS "-g -Wall")

find_package(PkgConfig REQUIRED)
pkg_check_modules(gstreamer REQUIRED IMPORTED_TARGET gstreamer-1.0 gstreamer-video-1.0 gstreamer-app-1.0)

aux_source_directory(src SOURCE_DIR)

link_libraries(
  PkgConfig::gstreamer
  pthread
  rt
  fmt
)

include_directories(
  ../include
)

add_executable(MKVDecode_test 
  src/MKVdecode.cpp
  run/MKVDecode_test.cpp
)
add_executable(FrameReader_test 
  src/FrameReader.cpp
  run/FrameReader_test.cpp
)
add_executable(MKV2JPG 
  ${SOURCE_DIR}
  run/main.cpp
)
